package com.czk.yygh.statistics.controller;

import com.czk.vo.order.OrderCountQueryVo;
import com.czk.yygh.common.result.Result;
import com.czk.yygh.order.client.OrderFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/12/1 23:31
 */
@RestController
@RequestMapping("/admin/statistics")
public class StatisticsController {
    @Autowired
    private OrderFeignClient orderFeignClient;

    /**
     * 远程获取预约统计数据
     *
     * @param orderCountQueryVo
     * @return
     */
    @GetMapping("/getCountMap")
    public Result getCountMap(OrderCountQueryVo orderCountQueryVo) {
        Map<String, Object> countMap = orderFeignClient.getCountMap(orderCountQueryVo);
        return Result.ok(countMap);
    }
}
